package com.baijia.web.util;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by dudu on 16/7/27.
 */
public enum ChannelEnum {
    QQ("qq", "qq"),
    WEIBO("weibo", "新浪微博"),
    ALIPAY("alipay", "支付宝"),
    RENREN("renren", "人人"),
    WECHAT("wechat", "微信");

    private String key;
    private String value;

    private static Map<String, ChannelEnum> _statusMaps = new HashMap<String, ChannelEnum>();
    static {
        for(ChannelEnum channelEnum : ChannelEnum.values()) {
            _statusMaps.put(channelEnum.key, channelEnum);
        }
    }

    public static ChannelEnum getChannelByKey(String key) {
        return _statusMaps.get(key);
    }

    ChannelEnum(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public String getKey() {
        return this.key;
    }

    public String getValue() {
        return this.value;
    }




}
